#include <iostream>
#include <deque>
#include <string>
#include <sstream>
using std::cout;
using std::endl;
using std::cin;
using std::deque;
using std::string;
using std::istringstream;


void test(){
    deque<string> dq;
    string line,word;
    getline(cin,line);
    istringstream is(line);
    while(is >> word ){
        dq.push_back(word);
    }
    
    deque<string>::iterator it = dq.begin();
    for(;it != dq.end();++it){
        cout << *it << endl;
    }
}

int main()
{
    

    test ();
    return 0;
}

